package com.arcvideo.acsconnect.rest.service;

import com.arcvideo.acsconnect.rest.model.Account;
import com.arcvideo.acsconnect.rest.model.FeedbackRequestBean;
import com.arcvideo.acsconnect.rest.model.ResultBean;
import com.arcvideo.acsconnect.rest.model.UpgradeResultBean;
import com.arcvideo.acsconnect.rest.model.UserBean;
import com.arcvideo.acsconnect.rest.model.WXAccessToken;
import com.arcvideo.acsconnect.rest.model.WXUserInfo;

import java.util.List;

import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * @author shenmengchao
 * @version 1.0.0
 * @date 2017/10/31
 * @description
 */

public interface AppService {

//    @GET("https://api.weixin.qq.com/sns/oauth2/access_token")
//    Observable<WXAccessToken> getAccessToken(@Query("appid") String appid,
//                                             @Query("secret") String secret,
//                                             @Query("code") String code,
//                                             @Query("grant_type") String grant_type);
//
//    @GET("https://api.weixin.qq.com/sns/oauth2/refresh_token")
//    Observable<WXAccessToken> refreshToken(@Query("appid") String appid,
//                                           @Query("refresh_token") String refreshToken,
//                                           @Query("grant_type") String grant_type);
//
//    @GET("https://api.weixin.qq.com/sns/userinfo")
//    Observable<WXUserInfo> getUserInfo(@Query("access_token") String access_token,
//                                       @Query("openid") String openid,
//                                       @Query("lang") String lang);
//
//    @POST("http://acquisition.vc.hongshiyun.net:8085/api/user/feedback")
//    Observable<ResultBean> feedback(@Query("action") String action,
//                                    @Body FeedbackRequestBean requestBean);


    @GET("/rest")
    Observable<ResultBean<List<UserBean>>> getAccountsByStbId(@Query("accessAction") String accessAction,
                                                              @Query("timestamp") String timestamp,
                                                              @Query("stbId") String stbId
    );

    @POST("/rest")
    Observable<ResultBean<UserBean>> login(@Query("accessAction") String accessAction,
                                           @Query("account") String account,
                                           @Query("password") String password);

    @POST("/rest")
    Observable<ResultBean<UserBean>> logout(@Query("accessAction") String accessAction,
                                            @Query("timestamp") String password);

    @GET("/rest")
    Observable<ResultBean<List<Account>>> getAccountsByPage(@Query("accessAction") String accessAction,
                                                            @Query("timestamp") String timestamp,
                                                            @Query("id") String id,
                                                            @Query("typeArr") String typeArr
    );

    @GET("/rest")
    Observable<ResultBean<UpgradeResultBean>> checkNewVersion(@Query("accessAction") String accessAction,
                                                              @Query("timestamp") String timestamp,
                                                              @Query("versionText") String id
    );


}
